package com.example.light.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@ApiModel(value = "设备信息")
@AllArgsConstructor
@NoArgsConstructor
@Data
@TableName("sys_device_duration")
public class duration {
    @ApiModelProperty("设备在线时长信息统计ID")
    @TableId(type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("设备编号")
    private String deviceNumber;

    @ApiModelProperty("设备名称")
    private String deviceName;

    @ApiModelProperty("设备在线时长")
    private Integer deviceOnline;

    @ApiModelProperty("数据统计时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime durationTime;
}
